Fix Python 3.15 smoke tests on Windows and Linux - #8357
Merged
Conversation
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
atalman
marked this pull request as ready for review
July 23, 2026 13:28
zxiiro
approved these changes
Jul 23, 2026
atalman
force-pushed
the
atalman/win-python-3.15
branch
6 times, most recently
from
July 23, 2026 15:19
aa56d95 to
decc479
Compare
albanD
reviewed
Jul 23, 2026
| # (e.g. pillow, a hard torchvision dependency) that have no cp315 wheels | ||
| # yet and fail to build from sdist. Re-enable once the ecosystem ships | ||
| # cp315 wheels. | ||
| if: ${{ inputs.run-smoke-test && ! startsWith(matrix.python_version, '3.15') }} |
Contributor
There was a problem hiding this comment.
Isn't this for the linux wheel?
Contributor
Author
| ) | ||
| self.assertNotIn("3.15", versions) | ||
| self.assertNotIn("3.15t", versions) | ||
| def test_preview_python_versions_excluded_on_macos(self): |
Contributor
There was a problem hiding this comment.
Is this dead code? You changed the name, but no caller.
atalman
force-pushed
the
atalman/win-python-3.15
branch
2 times, most recently
from
July 23, 2026 15:30
1dc4023 to
2d4facb
Compare
atalman
force-pushed
the
atalman/win-python-3.15
branch
3 times, most recently
from
July 23, 2026 15:57
2ef0eb9 to
4375c56
Compare
This was referenced Jul 23, 2026
Closed
atalman
added a commit
that referenced
this pull request
Jul 24, 2026
…rch.org (#8362) ## Summary numpy does not yet publish cp315 wheels on PyPI, so torch preview-Python (3.15 / 3.15t) wheel builds and smoke tests fail when pip tries to resolve numpy and falls back to building it from an sdist. This adds tooling to pre-build numpy and host it on download.pytorch.org so those installs resolve a real wheel. Related: #8357 (which currently works around the missing numpy with `--no-deps`). ## What this adds - **`.github/workflows/build-numpy-preview.yml`** — `workflow_dispatch` workflow, matrix over both arches: - x86_64 → `linux.2xlarge` + `pytorch/manylinux2_28-builder:cpu` - aarch64 → `linux.arm64.m8g.4xlarge` + `pytorch/manylinux2_28_aarch64-builder:cpu-aarch64` - Inputs: `numpy_version` (default `2.5.1`), `python_versions` (default `3.15 3.15t`), `channel` (`nightly`/`test`, selects the matching IAM role), `manywheel_version`, `dry_run` (default **true**). - **`.github/scripts/build_numpy_preview.sh`** — builds numpy from sdist against each `/opt/python/cp315*` interpreter, repairs with `auditwheel repair --plat manylinux_2_28_<arch>`, and uploads to `s3://pytorch/whl/<channel>/` with `--acl public-read` + `checksum-sha256` metadata (matching the binary upload workflow). After a real (non-dry) run, the existing hourly `update-s3-html` workflow republishes the `whl/<channel>` package indices to include numpy. ## Testing - Defaults to `dry_run=true` (build-only, no upload) for a first sanity check.
numpy does not publish cp315 wheels on PyPI, so installing a freshly built wheel under 3.15 / 3.15t falls back to the numpy sdist and tries to build it from source. On Windows that build fails outright in the conda env (meson: "Cython requires python3 dependency for link testing"), so the wheel is never installed and the smoke test reports ModuleNotFoundError. cp315 wheels for both numpy and pillow are published on download.pytorch.org across cpu / cu126 / cu128 / cu129 / cu130 / xpu, so for 3.15 / 3.15t resolve runtime deps from there with --pre (numpy is 2.6.0.dev0). All other Python versions keep installing from PyPI unchanged. Windows: applies to both the X64 and ARM64 smoke tests. Linux: re-enables the smoke test for 3.15, which was skipped for this exact reason, and applies the same dependency resolution. The binary-build-matrix changes from the earlier revision of this PR are dropped: pytorch#8427 has since enabled 3.15 / 3.15t by default for every OS and removed the opt-in preview mechanism they were built on.
atalman
force-pushed
the
atalman/win-python-3.15
branch
from
August 5, 2026 00:33
f3647e1 to
c20124b
Compare
atalman
force-pushed
the
atalman/win-python-3.15
branch
from
August 5, 2026 01:05
80330f8 to
c20124b
Compare
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
numpypublishes no cp315 wheels on PyPI, so installing a freshly built wheel under 3.15 / 3.15t falls back to the numpy sdist and tries to build it from source. On Windows that build fails outright in the conda env:so
pip install <wheel>aborts, the wheel is never installed, and the smoke test reportsModuleNotFoundError: No module named 'torchvision'— a symptom two steps removed from the cause.cp315 wheels for both numpy and pillow are published on
download.pytorch.orgacrosscpu / cu126 / cu128 / cu129 / cu130 / xpu, so for 3.15 / 3.15t this resolves runtime deps from there with--pre(numpy is currently2.6.0.dev0). All other Python versions install from PyPI exactly as before.Changes
build_wheels_windows.yml) — both the X64 and ARM64 smoke tests.build_wheels_linux.yml) — re-enables the 3.15 smoke test, which was skipped for exactly this reason, and applies the same dependency resolution. Re-enabling it without that would just relocate the failure, since numpy still has no cp315 wheels on PyPI.--index-url(rather than--extra-index-url) replaces PyPI for that install, so every torchvision runtime dependency has to be present on the pytorch index. Verified fortorch,numpyandpillowwith cp315win_amd64,win_arm64andmanylinuxbuilds across all of the indices listed above.Dropped from the earlier revision
The
generate_binary_build_matrix.pyand matrix-test changes are gone. #8427 has since enabled 3.15 / 3.15t by default for every OS and removed the opt-ininclude_preview_python_versionsmechanism those hunks extended, so they are obsolete. The[DO NOT MERGE]PR-build override is also dropped.Follow-up
This fixes CI only. A user running
pip install torchvisionon Python 3.15 still cannot satisfy the numpy dependency from PyPI, so 3.15 remains effectively nightly-only until upstream numpy ships cp315 wheels.